__________________________________________________________________________________________________
class Solution:
    def numberOfDays(self, y: int, m: int) -> int:
        add=0
        if y%400==0:
            add=1
        elif y%4==0 and y%100!=0:
            add=1
        if m==2:
            return 28+add
        if m<=7:
            return 30+(m%2)
        return 31-(m%2)
__________________________________________________________________________________________________

__________________________________________________________________________________________________
